package com.dcd.service;

import com.dcd.pojo.Collection_video;
import com.dcd.service.impl.Collection_videoServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Component
@FeignClient(name = "donchedi-provider9091",fallback = Collection_videoServiceImpl.class,contextId = "collectionVideo")
public interface Collection_videoService {

    /**
     * 根据登入用户id查询所有视频集合
     * @param user_id 登入用户id
     * @return
     */
    @RequestMapping("/select_collection_videoList_byId")
    public List<Collection_video> select_collection_videoList_byId(@RequestParam Integer user_id);

    /**
     * 根据type类型来判断进行添加或者删除
     * @param collection_video 收藏视频表对象
     * @param type 类型
     * @return
     */
    @RequestMapping("/insert_or_delete_collection_video")
    public String insert_or_delete_collection_video(@RequestBody Collection_video collection_video, @RequestParam String type);


    /**
     * 查询登录id 是否收藏了该视频   视频播放页
     * @param collection_video 收藏表对象
     * @return
     */
    @RequestMapping("/select_voider_broadcast")
    public String select_voider_broadcast(@RequestBody Collection_video collection_video);
}
